package server.service;

public class MappedService {
    private MappedConnect[] connects;

    private MappedEngine engine;

    public MappedService(MappedConnect[] connects, MappedEngine engine) {
        this.connects = connects;
        this.engine = engine;
    }

    public MappedService() {
    }

    public void init(int size) {
        connects = new MappedConnect[size];
    }

    public MappedConnect[] getConnects() {
        return connects;
    }

    public void setConnects(MappedConnect[] connects) {
        this.connects = connects;
    }

    public MappedEngine getEngine() {
        return engine;
    }

    public void setEngine(MappedEngine engine) {
        this.engine = engine;
    }

    private int index = 0;

    public void addConnect(MappedConnect connect) {
        connects[index++] = connect;
    }
}
